function setRem() {
    //视口的宽度
    let clientWidth = parseInt(document.documentElement.clientWidth)
    //计算比例
    let rate = (clientWidth / 750) * 100
    console.log(clientWidth, rate)
    // document.documentElement===html
    document.documentElement.style.fontSize = rate + 'px'
}
window.onload = setRem
window.onresize = setRem